package com.lkd.controller;

import com.lkd.service.ITaskService;
import com.lkd.vo.Result;
import com.lkd.vo.TaskVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * ClassName: TaskRefactorController
 * Package: com.lkd.controller
 * Description:
 *
 * @Author zt
 * @Create 2025/10/22 14:45
 * @Version 1.0
 */
@RestController
@RequiredArgsConstructor
@Slf4j
@RequestMapping("/api/task-service/task")
public class TaskRefactorController {
    private final ITaskService taskService;

    /**
     * 工单统计（SQL、Xml版本）
     */
    @GetMapping("/taskReportInfo/{start}/{end}")
    public Result taskReportInfo(@PathVariable String start, @PathVariable String end){
        List<TaskVo> taskVo = taskService.taskInfo(start, end);
        log.info("工单统计xml版本：yyds~");
        return Result.success(taskVo);
    }
}
